//
//  HttpTools.h
//  MIcroBlog
//
//  Created by zhoupengfei on 15/2/12.
//  Copyright (c) 2015年 zpf. All rights reserved.
//
#ifdef DEBUG
#else
#define NSLog(...) {};
#endif

#import <Foundation/Foundation.h>

#define KPageSize 20
/*
 *************************************************************************************
 城建
 */
#define BaseURL @"http://220.189.235.250:8080/IOSOA/jh/"
#define KexchgeneralURL  @"exchgeneral" //通用接口
#define KexchdataURL @"exchdata" //通用接口
#define KexchmailURL @"exchmail"  // 邮件
#define KexchksmailURL @"exchksmail"
#define KLoginURL @"exch" //登录
#define KexchTree @"exchTree"


#define  KTodoPagdMethod @"todoPage" //待办 分页列表
#define KGetOAOfficeMethod @"getOaOffice" //待办/在办 详情页
#define KSetSignInMethod @"setSignIn" //签收
#define KSetSubmitWorkMethod @"setSubmitWork" //发送/提交接口
#define KSetRetStaffList @"setRetStaffList" //选择环节接口
#define KSetStaffListDeliVerMethod @"setStaffListDeliver" //提交选择人员接口
#define KInpageMethod @"inPage" //最新收文接口
#define KContentInMethod @"contentIn" //最新收文详情
#define KDipatchPageMethod @"dipatchPage" //最新发文
#define KContentDipatchMethod @"contentDipatch" //最新发文详情
#define KMailPageMethod @"mailPage" //收件箱列表
#define KContentMailMethod @"contentMail" //邮件详情
#define KOutboxMethod @"outboxPage" //发件箱列表
#define KSendMailMethod @"sendMail" //发送邮件
#define KReturnTreeMethod @"returnTree" //收件列表
#define KSlectronicsPageMethod @"electronicsPage" //近期公告
#define KContentElectronicsMethod @"contentElectronics" //近期公告详情
#define KInfojbPageMethod @"infojbPage" //期刊信息
#define KContentInfoBriefingMethod @"contentInfoBriefing" //期刊信息详情
#define KLookRecord @"lookRecord" //最新收文/发文记录阅读记录接口
#define KSetSaveWork @"setSaveWork" //保存接口
#define KmailPage @"mailPage"
#define KoutboxPage @"outboxPage"

/*
 *************************************************************************************
 
  //安吉
 */
#define AnJiBaseURL @"http://61.164.105.22:8080/COUNTIESIOA/jh/" //外网
//#define AnJiBaseURL @"http://172.21.153.40:8080/IOSOA/jh/" //内网

#define KExchexchangeURL @"exchexchange" //2.1.3	待收文件列表
#define KExchexchangealURL  @"exchgeneral"
#define  KExchangeSubstance @"exchangeSubstance"
#define KAnJiLoginURL @"exch" //登录
#define KExchangeRecord @"exchangeRecord" //阅读记录
#define  KExchother @"exchother"  ///2.1.78	短信已发列表接口
#define KExchTree @"exchTree"
#define KExchmain @"exchmain"
#define KexchRead @"exchRead"

#define KroamHistory @"roamHistory" //流转历史
#define KExhcangePageMethod @"exhcangePage"  //显示待收列表
#define KReceivedExhcangePage @"receivedExhcangePage" //已收文件列表
#define KSendExhcangePage @"sendExhcangePage" //已发
#define KReadFilePageK @"readFilePage" //待阅
#define KSignExhcange @"signExhcange" //签收文件
#define KContentExhcange @"contentExhcange"
#define KContentReadFile @"contentReadFile"// 待阅详情
#define KSetSubmitBumph @"setSubmitBumph" // 提交意见
#define KSetSubmitMeeting @"setSubmitMeeting"  // 2.1.9	会议提交意见
#define KSetSubmitInstructions @"setSubmitInstructions" //批示件提交
#define KSignInRecord @"SignInRecord" // 公文，便函，批示件
#define KSignInMeetRecord @"SignInMeetRecord" //会议阅读记录
#define KInstructionsNamelist @"InstructionsNamelist" //批示件回复
#define KMeetNamelist @"MeetNamelist" //会议名单
#define KCollectSearch @"CollectSearch"  //2.1.26	待收搜索
#define KReceivedSearch @"ReceivedSearch" //2.1.27	已收搜索
#define KPostedSearch @"PostedSearch" //2.1.28	已发搜索

#define KMessagePage @"messagePage" //短信列表
#define KAddressListPage @"addressListPage" //通讯录
#define KAdressListSearch @"adressListSearch" //通讯录搜索
#define KGlobalTree @"globalTree"  //2.1.72	全县地址本单位接口
#define KDepTree @"depTree"
#define KDepTxlTree @"depTxlTree"
#define KLocalTree @"localTree"
#define KsTree @"KsTree"
#define KMessageSend @"messageSend"
#define KHomePqwoiunu @"homePqwoiunu"
#define KHomeMailwoiunu @"homeMailwoiunu"
#define KreadFileMethod @"readFile"
#define KUpdateDownMethod @"updateDown"


/*
 *************************************************************************************
 */



#define KSystemVersion   [[UIDevice currentDevice] systemVersion]
typedef void (^HttpSuccessBlock) (id JSON);
typedef void (^HttpFailureBlock) (NSError*error);
@interface HttpTools : NSObject
+(void)postWithURL:(NSString*)url arrays:(NSArray*)arrays  method:(NSString*)method success:(void(^)(id JSON))success failure:(void(^)(NSError *error))failure; //post请求


+(void)downFileWith:(NSString*)url success:(HttpSuccessBlock)success failure:(HttpFailureBlock)failure; //文件下载


//安吉
+(void)requestWithURL:(NSString*)url arrays:(NSArray*)arrays  method:(NSString*)method success:(void(^)(id JSON))success failure:(void(^)(NSError *error))failure;//post请求

//+(void)postParamsWithURL:(NSString*)url method:(NSString*)method params:(NSDictionary*)params success:(void(^)(id JSON))success failure:(void(^)(NSError *error))failure;//post请求


@end
